:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #3178c6aa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.login-form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-title {
  text-align: center;
  color: #333;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.login-input {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.login-input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.login-button {
  width: 100%;
  padding: 0.8rem;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.login-button:hover {
  background-color: #357abd;
}

.login-button:active {
  background-color: #2d6da3;
}

.login-divider {
  text-align: center;
  margin: 1rem 0;
  position: relative;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #ddd;
}

.login-divider span {
  background-color: white;
  padding: 0 1rem;
  color: #666;
  font-size: 0.9rem;
}

.third-party-login {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.third-party-btn {
  width: 50px;
  height: 50px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background-color: white;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.third-party-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.third-party-btn.wechat:hover {
  border-color: #07c160;
  color: #07c160;
}

.third-party-btn.qq:hover {
  border-color: #12b7f5;
  color: #12b7f5;
}

.third-party-btn.weibo:hover {
  border-color: #e6162d;
  color: #e6162d;
}

.third-party-btn.alipay:hover {
  border-color: #1677ff;
  color: #1677ff;
}

/* JD Homepage Styles */
.jd-homepage {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
.jd-header {
  background: #fff;
  border-bottom: 2px solid #e1251b;
}

.header-top {
  background: #e3e3e3;
  padding: 5px 0;
  font-size: 12px;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-menu a {
  color: #999;
  text-decoration: none;
  margin-left: 15px;
}

.user-menu a:hover {
  color: #e1251b;
}

.header-main {
  padding: 20px 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo img {
  height: 60px;
}

.search-box {
  flex: 1;
  display: flex;
  max-width: 500px;
}

.search-box input {
  flex: 1;
  padding: 10px;
  border: 2px solid #e1251b;
  border-right: none;
  font-size: 14px;
}

.search-btn {
  padding: 10px 20px;
  background: #e1251b;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.cart {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  cursor: pointer;
}

.cart-count {
  background: #e1251b;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
}

/* Navigation */
.jd-nav {
  background: #e1251b;
  padding: 10px 0;
}

.nav-categories {
  display: flex;
  gap: 30px;
  color: white;
}

.nav-item {
  cursor: pointer;
  font-size: 14px;
}

.nav-item:hover {
  text-decoration: underline;
}

/* Main Content */
.jd-main {
  padding: 20px 0;
  background: #f5f5f5;
}

.main-content {
  display: flex;
  gap: 20px;
}

/* Sidebar */
.sidebar {
  width: 200px;
  background: white;
  border-radius: 4px;
}

.category-menu {
  padding: 10px 0;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
}

.category-item:hover {
  background: #f5f5f5;
  color: #e1251b;
}

.arrow {
  color: #999;
  font-size: 12px;
}

/* Banner Section */
.banner-section {
  flex: 1;
  display: flex;
  gap: 20px;
}

.main-banner {
  flex: 1;
}

.main-banner img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 4px;
}

.banner-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-banner img {
  width: 200px;
  height: 190px;
  object-fit: cover;
  border-radius: 4px;
}

/* Featured Products */
.featured-products {
  padding: 40px 0;
  background: white;
}

.section-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 30px;
  color: #333;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.product-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 15px;
}

.product-title {
  font-size: 16px;
  margin-bottom: 5px;
  color: #333;
}

.product-desc {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-price {
  font-size: 18px;
  font-weight: bold;
  color: #e1251b;
}

.original-price {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}

/* Footer */
.jd-footer {
  background: #f5f5f5;
  padding: 40px 0;
  margin-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-section h4 {
  color: #333;
  margin-bottom: 15px;
  font-size: 16px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
}

.footer-section a:hover {
  color: #e1251b;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
